from ai_assistant import AIAssistant

class TranslationAssistant(AIAssistant):
    def __init__(self, id, name, version, is_online, ability_score, supported_language_pairs):
        super().__init__(id, name, "翻译", version, is_online, ability_score)
        self.supported_language_pairs = supported_language_pairs
    
    def execute_task(self, task_content):
        return f"[{self.get_name()}] 执行翻译任务：\n原文：{task_content}\n翻译结果：（已完成翻译，支持语言对：{self.supported_language_pairs}）"
    
    # Getter and setter for supported_language_pairs
    def get_supported_language_pairs(self):
        return self.supported_language_pairs
    
    def set_supported_language_pairs(self, supported_language_pairs):
        self.supported_language_pairs = supported_language_pairs
    
    def __str__(self):
        return super().__str__() + f", 支持语言:{self.supported_language_pairs}"